package day07;

import java.util.Arrays;

public class ArraysTest {
	public static void main(String[] args) {
		int[] arr1 = new int[]{1,2,3,4};
		int[] arr2 = new int[]{1,3,2,4};
		
		// boolean Arrays.equals()
		boolean isQual = Arrays.equals(arr1,arr2);
		System.out.println(isQual);
		
		// String Arrays.toString()
		System.out.println(Arrays.toString(arr1));
		
		// void Arrays.fill(arr[], var)
		Arrays.fill(arr1, 10);
		System.out.println(Arrays.toString(arr1));
		
		// void Arrays.sort()
		Arrays.sort(arr2);
		System.out.println(Arrays.toString(arr2));
		
		// int Arrays.binarySearch
		int[] arr3 = new int[]{12,-2,5,123,62,36,-52,0};
		Arrays.sort(arr3);
		int index = Arrays.binarySearch(arr3, 62);
		System.out.println(index);
		
	}
}
